<!doctype html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
	<link rel="icon" href="https://static.nowcoder.com/images/logo_87_87.png"/>
	<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" crossorigin="anonymous">
	<link rel="stylesheet" th:href="@{/css/global.css}" />
	<title>个人主页</title>
</head>
<body>
	<div class="nk-container">
		<!-- 头部 -->
		<header class="bg-dark sticky-top" th:replace="index::header">
		</header>

		<!-- 内容 -->
		<div class="main">
			<div class="container">
				<!-- 选项 -->
				<div class="position-relative">
					<ul class="nav nav-tabs">
						<li class="nav-item">
							<a class="nav-link active" th:href="@{|/user/profile/${target.id}|}">个人信息</a>
						</li>
						<li class="nav-item">
							<a class="nav-link" th:href="@{|/discuss/user/${target.id}|}"><i th:text="${loginUser!=null &&loginUser.id==target.id?'我':'TA'}"></i>的帖子</a>
						</li>
						<li class="nav-item">
							<a class="nav-link" th:href="@{|/comment/user/${target.id}|}"><i th:text="${loginUser!=null &&loginUser.id==target.id?'我':'TA'}"></i>的回复</a>
						</li>
					</ul>
				</div>
				<!-- 个人信息 -->
				<div class="media mt-5">
					<img th:src="${target.headerUrl}" class="align-self-start mr-4 rounded-circle" alt="用户头像" style="width:50px;height: 50px">
					<div class="media-body">
						<h5 class="mt-0 text-warning">
							<span th:utext="${target.username}">nowcoder</span>
							<button th:if="${target.id!=loginUser.id}" id="follow-btn" th:onclick="|follow(3,${target.id});|" type="button"  th:class="|btn btn-sm float-right mr-5 ${followStatus==0?'btn-info':'btn-secondary'}|" th:text="${followStatus==0?'关注TA':'已关注'}">关注TA</button>
						</h5>
						<div class="text-muted mt-3">
							<span>注册于 <i class="text-muted" th:text="${#dates.format(target.createTime,'yyyy-MM-dd HH:mm:ss')}">2015-06-12 15:20:12</i></span>
						</div>
						<div class="text-muted mt-3 mb-5">
							<span>关注 <a class="text-primary" th:href="@{|/followeeDetail/${target.id}|}" th:text="${followeeCount}">5</a> 人</span>
							<span class="ml-4">粉丝 <a class="text-primary" id="follower-count" th:href="@{|/followerDetail/3/${target.id}|}" th:text="${followerCount}">123</a> 人</span>
							<span class="ml-4">获赞 <i class="text-danger" th:text="${likeCount}">87</i> 个</span>
						</div>
					</div>
				</div>
			</div>
		</div>

		<!-- 尾部 -->
		<footer class="bg-dark" th:replace="index::footer">
		</footer>
	</div>

	<script src="https://code.jquery.com/jquery-3.3.1.min.js" crossorigin="anonymous"></script>
	<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" crossorigin="anonymous"></script>
	<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" crossorigin="anonymous"></script>
	<script th:src="@{/js/global.js}"></script>
	<script th:src="@{/js/profile.js}"></script>
</body>
</html>
